package org.algorithm.List;

public class ListTest
{
    public static void main(String[] args) {
        SinglyLinkedList singlyLinkedList = new SinglyLinkedList();

        singlyLinkedList.addLast(0);
        singlyLinkedList.addLast(1);
        singlyLinkedList.addLast(2);


        singlyLinkedList.insert(1,5);


//        int value2= singlyLinkedList.get(1);
//        System.out.println(value2);


        singlyLinkedList.loop((value->{
            System.out.println(value);
        }));

//        singlyLinkedList.removeFirst();

        singlyLinkedList.remove(0);

        System.out.println("------------------------");

        singlyLinkedList.loop((value->{
            System.out.println(value);
        }));

        singlyLinkedList.loop2();
//
//        int value = singlyLinkedList.get(0);
//        System.out.println(value);
    }
}
